<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <meta name="format-detection" content="telephone=no" />
    <title>参与列表</title>
    <link rel="stylesheet" href="css/style.css?v=1.6">
    <link rel="stylesheet" href="css/cup.css?v=1.6">
    <script src="js/jquery-1.8.3.min.js?v=1.6"></script>
    <script src="layer/mobile/layer.js?v=1.6"></script>
    <script src="js/flexible.js?v=1.6"></script>
</head>
<body style="background: #F9F9F9;">
	<div class="no-order">
		<img src="image/cry.png">
		<p>您还没有兑换的订单~</p>
	</div>
	<div id="list">
		
	</div>
	<p class="no-more">没有更多了~</p>
</body>
<script type="text/javascript">
	$(function(){
		var userid = sessionStorage.getItem('userId');
			postData = {
				userID:userid
			};
		$ajax(
			url+'getMatchOrderList.ashx',
			'POST',
			postData,
			function(data){
				if(data.data.orderList.length > 0){
					var list = data.data.orderList,
						res = '';
					$('.no-order').hide();
					for(var i =0;i<list.length;i++ ){
						res += '<div class="list no-border">'+'<p class="timer clearfix border-b">投注时间：<span class="time">'+list[i].CreatedDateTime+'</span> <span class="fr">状态：';
							if(list[i].Status == 'WC'){
								res+='<i class="status">等待开奖</i></span></p>';
							}else if(list[i].Status == 'SU'){
								res+='<i class="status">已开奖</i><i class="award">得：'+list[i].WinYunZuan+'</i></span></p>';
							}
						res+='<div class="comun">'+
							'<div class="row pic">';
								if(list[i].VoteValue == 1){
									res+='<img src="image/win.png">';
								}else if(list[i].VoteValue == 2){
									res+='<img src="image/flat.png">';
								}else if(list[i].VoteValue == 3){
									res+='<img src="image/burden.png">';
								}	
						res+='</div>'+
						'<div class="row">'+
							'<div class="unit"><span class="group1">'+list[i].ZhuDui+'</span> VS <span class="group2">'+list[i].KeDui+'</span></div>'+
							'<div class="unit sustain">支持云钻数: <span class="total">'+list[i].VoteYunZuan+'</span></div>'+
						'</div>'+
						'</div>'+
						'</div>'
					}
					$('#list').html(res);
				}else{
					$('.no-order').show();
					$('.no-more').hide();
				}
			},
			function(data){
				$('.no-order').show();
				$('.no-more').hide();
				layer.open({
					content: data.msg,
					skin: 'msg',
					className:'layer-ziti',
					time: 2 
				});
			}
		)
	})
</script>
</html>